<script setup>
    import { useRouter } from 'vue-router';
    import userStore from '../store/userStore';

    let router=useRouter();
    let jumpShow=()=>{
        router.push("/show");
    }

    //存储对象
    let user = userStore();

    let saveData =()=>{
        user.id = 88;
        user.name = "二狗子";
        console.log("存储成功!!!!");
    }
</script>

<template>
  <div>
     <button @click="saveData()">save数据</button>
     <hr>
     <button @click="jumpShow()">跳转show</button>
  </div>
</template>

<style scoped>

</style>